package com.digua.baseiot.api

import com.digua.base.api.ApiBaseBean
import java.util.Objects

class ApiBean : ApiBaseBean {
    var code = 0
    var msg: String? = null
    var total = 0
    var pageNum = 1
    var pages = 0

    override fun isSuccess() =  code == 200 || Objects.equals("success", msg)
    override fun resMsg() = if (msg?.isNotBlank() == true) msg!! else "操作失败"
    override fun total() = total
    override fun pageIndex() = pageNum
    override fun pages() = pages
}